<?php
namespace Mapi\Controller\V1_0;
use Mapi\Controller\BaseController;
class ToolsController extends BaseController
{
	function xueke()
	{
		$ope= D('ZyMenu');
		$mldm=json_decode($this->_menu['zyxw'],true);
		foreach($mldm as $key=>$val){
			$word = 'zyxw';
			$Yjxkdm = $val['dm'];
			$sql = "SELECT *FROM chsi_zy_menu WHERE  mldm='".$word."' AND  yjxkdm  ='".$Yjxkdm."'  GROUP BY zymc";
			$zyleibie = $ope->query($sql);
			foreach($zyleibie as $k=>$v){
				echo "专业学位," ;
				echo $val['mc'].",";
				echo $v['zymc']."<br>" ;

			}
		}
		$mldm=json_decode($this->_menu['XSLY'],true);
		foreach($mldm as $key=>$val){
			$word =$val['mc'];
			foreach($val['data'] as $kk=>$vv){
				$Yjxkdm = $vv['dm'];
				$sql = "SELECT *FROM chsi_zy_menu WHERE  mldm='".$word."' AND  yjxkdm  ='".$Yjxkdm."'  GROUP BY zymc";
				$zyleibie = $ope->query($sql);
				foreach($zyleibie as $k=>$v){
					echo "学术学位," ;
					echo $vv['mc'].",";
					echo $v['zymc']."<br>" ;

				}
			}
		}


	}

	function mkshuxue(){

$str="法律（法学）;
法律（非法学）;
法律经济学;
道德—政治—法律哲学;
法律逻辑学;
法律史;
法律文化;
法律与金融;
政治、经济与法律;
法律治理学;
宪法学与行政法学;
刑法学;
诉讼法学;
经济法学;
环境与资源保护法学;
军事法学;
政治学理论;
中外政治制度;
科学社会主义与国际共产主义运动;
中共党史;
国际政治;
国际关系;
外交学;
社会学;
人口学;
人类学;
民俗学;
民族学;
马克思主义民族理论与政策;
中国少数民族经济;
中国少数民族史;
中国少数民族艺术;
马克思主义基本原理;
马克思主义发展史;
马克思主义中国化研究;
国外马克思主义哲学;
国外马克思主义研究;
思想政治教育;
民商法学;
国际法学;
教育学原理;
课程与教学论;
教育史;
比较教育学;
学前教育学;
高等教育学;
成人教育学;
职业技术教育学;
特殊教育学;
教育技术学;
基础心理学;
发展与教育心理学;
应用心理学;
体育人文社会学;
运动人体科学;
体育教育训练学;
民族传统体育学;
文艺学;
语言学及应用语言学;
汉语言文字学;
中国古典文献学;
中国古代文学;
中国现当代文学;
中国少数民族语言文化;
中国少数民族语言文学;
比较文学与世界文学;
英语语言文学;
俄语语言文学;
法语语言文学;
德语语言文学;
日语语言文学;
印度语言文学;
西班牙语语言文学;
阿拉伯语语言文学;
欧洲语言文学;
亚非语言文学;
外国语言学及应用语言学;
新闻学;
传播学;
新闻传播学;
史学理论及史学史;
考古学及博物馆学;
历史地理学;
历史文献学;
专门史;
中国古代史;
中国近现代史;
世界史;
无机化学;
分析化学;
有机化学;
物理化学;
高分子化学与物理;
自然地理学;
人文地理学;
海洋化学;
海洋生物学;
植物学;
动物学;
生理学;
水生生物学;
微生物学;
神经生物学;
遗传学;
发育生物学;
细胞生物学;
生物化学与分子生物学;
生态学;
科学技术史;
行政管理;
土地资源管理;
社会保障;
艺术学理论;
音乐与舞蹈学;
戏剧与影视学;
美术学;
设计学";

$arr =explode(";",$str);

$ope = D('ZyMenuNoschool');
 
	foreach($arr as $key=>$val){
		$map['zymc'] = array("like" ,"%".trim($val)."%");
		$map['zymc'] =trim($val);

		echo "insert into chsi_noshuxue set name='".trim($val)."';<br>";
		/*
		$t =$ope->where($map)->find();
		//echo $ope->getlastsql();
		//var_dump($t);
		if(!$t){
			echo "like '%".trim($val)."%'<br>";
		}
		*/
	
	}
}

	function mkline3()
	{
		$str='01|{"2018A":"280","2018B":"270","2017A":"285","2017B":"275","2016A":"280","2016B":"270","2015A":"280","2015B":"270","2014A":"290","2014B":"280"};
02|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
03|{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"};
04|{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"};
05|{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"};
06|{"2018A":"315","2018B":"305","2017A":"315","2017B":"305","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"310","2014B":"300"};
07|{"2018A":"280","2018B":"270","2017A":"290","2017B":"280","2016A":"285","2016B":"275","2015A":"275","2015B":"265","2014A":"285","2014B":"275"};
08|{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"};
09|{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"};
10|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
11|{"2018A":"270","2018B":"260","2017A":"280","2017B":"270","2016A":"280","2016B":"270","2015A":"290","2015B":"280","2014A":"290","2014B":"280"};
12|{"2018A":"330","2018B":"320","2017A":"340","2017B":"330","2016A":"335","2016B":"325","2015A":"335","2015B":"325","2014A":"335","2014B":"325"};
13|{"2018A":"335","2018B":"325","2017A":"335","2017B":"325","2016A":"335","2016B":"325","2015A":"325","2015B":"315","2014A":"325","2014B":"315"};
0251|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
0252|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
0253|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
0254|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
0255|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
0256|{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"};
0257|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
0351|{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"};
0352|{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"};
0353|{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"};
0451|{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"};
0452|{"2018A":"265","2018B":"255","2017A":"260","2017B":"250","2016A":"265","2016B":"255","2015A":"265","2015B":"255","2014A":"265","2014B":"255"};
0453|{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"};
0454|{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"};
0551|{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"};
0552|{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"};
0553|{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"};
0651|{"2018A":"315","2018B":"305","2017A":"315","2017B":"305","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"310","2014B":"300"};
0851|{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"};
0852|{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"};
0853|{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"};
0951|{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"};
0952|{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"};
0953|{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"};
0954|{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"};
1051|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
1052|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
1053|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
1054|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
1055|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
1056|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"};
1057|{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"280","2014B":"270"};
1151|{"2018A":"270","2018B":"260","2017A":"280","2017B":"270","2016A":"280","2016B":"270","2015A":"290","2015B":"280","2014A":"290","2014B":"280"};
1251|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
1252|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
1253|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
1254|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
1255|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
1256|{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"};
1351|{"2018A":"335","2018B":"325","2017A":"335","2017B":"325","2016A":"335","2016B":"325","2015A":"325","2015B":"315","2014A":"325","2014B":"315"};';
	
		$tt= explode(";",$str);
		foreach($tt as $key=>$val){

			$tt2 = explode("|",$val);
			$mldm=$tt2[0];
			$tt3 = str_replace(";","",$tt2[1]);

			$tt4 = json_decode($tt3,true);

			
			foreach($tt4 as $t4k=>$t4v){
				//var_dump(intval( $t4k));exit;
				if(	strpos($t4k, 'A')){
					$type=1;
				} else {
					$type=2;
				}
				$sql = "insert into chsi_line set ";
				$sql .= "mldm='".trim($mldm)."'";
				$sql .= ",year=".intval( $t4k);
				$sql .= ",fen=".$t4v;
				$sql .= ",type=".$type;
				$sql .= ";<br>";
				echo $sql;
	
			}

		}
	}

	function mkline2()
	{
		$zyxw='{"\u91d1\u878d":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u5e94\u7528\u7edf\u8ba1":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u7a0e\u52a1":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u56fd\u9645\u5546\u52a1":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u4fdd\u9669":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u8d44\u4ea7\u8bc4\u4f30":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u5ba1\u8ba1":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u6cd5\u5f8b":{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"},"\u793e\u4f1a\u5de5\u4f5c":{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"},"\u8b66\u52a1":{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"},"\u6559\u80b2":{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"},"\u6c49\u8bed\u56fd\u9645\u6559\u80b2":{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"},"\u5e94\u7528\u5fc3\u7406":{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"},"\u4f53\u80b2":{"2018A":"265","2018B":"255","2017A":"260","2017B":"250","2016A":"265","2016B":"255","2015A":"265","2015B":"255","2014A":"265","2014B":"255"},"\u7ffb\u8bd1":{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"},"\u65b0\u95fb\u4e0e\u4f20\u64ad":{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"},"\u51fa\u7248":{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"},"\u6587\u7269\u4e0e\u535a\u7269\u9986":{"2018A":"315","2018B":"305","2017A":"315","2017B":"305","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"310","2014B":"300"},"\u5efa\u7b51\u5b66":{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"},"\u5de5\u7a0b":{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"},"\u57ce\u5e02\u89c4\u5212":{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"},"\u519c\u4e1a":{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"},"\u517d\u533b":{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"},"\u98ce\u666f\u56ed\u6797":{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"},"\u6797\u4e1a":{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"},"\u4e34\u5e8a\u533b\u5b66":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u53e3\u8154\u533b\u5b66":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u516c\u5171\u536b\u751f":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u62a4\u7406":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u836f\u5b66":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u4e2d\u836f\u5b66":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u4e2d\u533b":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"280","2014B":"270"},"\u5de5\u5546\u7ba1\u7406":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u516c\u5171\u7ba1\u7406":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u4f1a\u8ba1":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u65c5\u6e38\u7ba1\u7406":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u56fe\u4e66\u60c5\u62a5":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u5de5\u7a0b\u7ba1\u7406":{"2018A":"165","2018B":"155","2017A":"170","2017B":"160","2016A":"165","2016B":"155","2015A":"160","2015B":"150","2014A":"160","2014B":"150"},"\u827a\u672f":{"2018A":"335","2018B":"325","2017A":"335","2017B":"325","2016A":"335","2016B":"325","2015A":"325","2015B":"315","2014A":"325","2014B":"315"}}';

		$xushu = '{"\u54f2\u5b66":{"2018A":"280","2018B":"270","2017A":"285","2017B":"275","2016A":"280","2016B":"270","2015A":"280","2015B":"270","2014A":"290","2014B":"280"},"\u7ecf\u6d4e\u5b66":{"2018A":"330","2018B":"320","2017A":"335","2017B":"325","2016A":"325","2016B":"315","2015A":"330","2015B":"320","2014A":"330","2014B":"320"},"\u6cd5\u5b66":{"2018A":"315","2018B":"305","2017A":"310","2017B":"300","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"315","2014B":"305"},"\u6559\u80b2\u5b66":{"2018A":"320","2018B":"310","2017A":"310","2017B":"300","2016A":"320","2016B":"310","2015A":"320","2015B":"310","2014A":"315","2014B":"305"},"\u6587\u5b66":{"2018A":"345","2018B":"335","2017A":"345","2017B":"335","2016A":"350","2016B":"340","2015A":"345","2015B":"335","2014A":"350","2014B":"340"},"\u5386\u53f2\u5b66":{"2018A":"315","2018B":"305","2017A":"315","2017B":"305","2016A":"315","2016B":"305","2015A":"300","2015B":"290","2014A":"310","2014B":"300"},"\u7406\u5b66":{"2018A":"280","2018B":"270","2017A":"290","2017B":"280","2016A":"285","2016B":"275","2015A":"275","2015B":"265","2014A":"285","2014B":"275"},"\u5de5\u5b66":{"2018A":"260","2018B":"250","2017A":"265","2017B":"255","2016A":"265","2016B":"255","2015A":"280","2015B":"270","2014A":"285","2014B":"275"},"\u519c\u5b66":{"2018A":"255","2018B":"245","2017A":"255","2017B":"245","2016A":"255","2016B":"245","2015A":"255","2015B":"245","2014A":"255","2014B":"245"},"\u533b\u5b66":{"2018A":"300","2018B":"290","2017A":"295","2017B":"285","2016A":"295","2016B":"285","2015A":"285","2015B":"275","2014A":"285","2014B":"275"},"\u519b\u4e8b\u5b66":{"2018A":"270","2018B":"260","2017A":"280","2017B":"270","2016A":"280","2016B":"270","2015A":"290","2015B":"280","2014A":"290","2014B":"280"},"\u7ba1\u7406\u5b66":{"2018A":"330","2018B":"320","2017A":"340","2017B":"330","2016A":"335","2016B":"325","2015A":"335","2015B":"325","2014A":"335","2014B":"325"},"\u827a\u672f\u5b66":{"2018A":"335","2018B":"325","2017A":"335","2017B":"325","2016A":"335","2016B":"325","2015A":"325","2015B":"315","2014A":"325","2014B":"315"},"\u4f53\u80b2\u5b66":{"2018A":"265","2018B":"255","2017A":"260","2017B":"250","2016A":"265","2016B":"255","2015A":"265","2015B":"255","2014A":"265","2014B":"255"}}';
		
		set_time_limit(0); 
		ini_set('memory_limit','256M');

		$mzyxw=json_decode($this->_menu['zyxw'],true);
		$mmldm=json_decode($this->_menu['mldm'],true);

		$temp = json_decode($xushu,true);
		foreach($mmldm as $key=>$val){
			echo $val['dm'];
			foreach($temp as $mk=>$mv){
				if($val['mc'] ==$mk ){
					echo json_encode($mv);
				}
			}
			echo "<br>";
		}
		$temp = json_decode($zyxw,true);
		foreach($mzyxw as $key=>$val){
			echo $val['dm'];
			foreach($temp as $mk=>$mv){
				if($val['mc'] ==$mk ){
					echo json_encode($mv);
				}
			}
			echo "<br>";
		}

	}

	function  mkline()
	{
		$str1="哲学,280,270,285,275,280,270,280,270,290,280;
		经济学,330,320,335,325,325,315,330,320,330,320;
		法学,315,305,310,300,315,305,300,290,315,305;
		教育学,320,310,310,300,320,310,320,310,315,305;
		文学,345,335,345,335,350,340,345,335,350,340;
		历史学,315,305,315,305,315,305,300,290,310,300;
		理学,280,270,290,280,285,275,275,265,285,275;
		工学,260,250,265,255,265,255,280,270,285,275;
		农学,255,245,255,245,255,245,255,245,255,245;
		医学,300,290,295,285,295,285,285,275,285,275;
		军事学,270,260,280,270,280,270,290,280,290,280;
		管理学,330,320,340,330,335,325,335,325,335,325;
		艺术学,335,325,335,325,335,325,325,315,325,315;
		体育学,265,255,260,250,265,255,265,255,265,255;";

		$str="金融、应用统计、税务、国际商务、保险、资产评估,330,320,335,325,325,315,330,320,330,320;
		审计,165,155,170,160,165,155,160,150,160,150;
		法律、社会工作、警务,315,305,310,300,315,305,300,290,315,305;
		教育、汉语国际教育,320,310,310,300,320,310,320,310,315,305;
		应用心理,320,310,310,300,320,310,320,310,315,305;
		体育,265,255,260,250,265,255,265,255,265,255;
		翻译、新闻与传播、出版,345,335,345,335,350,340,345,335,350,340;
		文物与博物馆,315,305,315,305,315,305,300,290,310,300;
		建筑学、工程、城市规划,260,250,265,255,265,255,280,270,285,275;
		农业、兽医、风景园林、林业,255,245,255,245,255,245,255,245,255,245;
		临床医学、口腔医学、公共卫生、护理、药学、中药学,300,290,295,285,295,285,285,275,285,275;
		中医,300,290,295,285,295,285,285,275,280,270;
		工商管理、公共管理、会计、旅游管理、图书情报、工程管理,165,155,170,160,165,155,160,150,160,150;
		艺术,335,325,335,325,335,325,325,315,325,315;";

		$zyxw = explode(";",$str1);


		$zyxwdata =array();
		$tt= array();
		$ttt = array();
		foreach($zyxw as $key=>$val){
			
			$tt= explode(",",$val);
			$kemu[0]=trim($tt[0]);
			$ttt= $tt;
			unset($ttt[0]);


			foreach($kemu as $tk=>$tv){

				if(!$tv){ continue;}
				//$zyxwdata[$tv]=array();
				$i=2018;
				$j=0;

				foreach($ttt as $ttk=>$ttv)
				{
					if($j%2 ==0  &&  $j>0)
					{
						$i--;
					}
					if($j%2 ==1 ){
						$ttkk= $i."B";
						$zyxwdata[$tv][$ttkk] = $ttv;
					} else {
						$ttkk= $i."A";

						$zyxwdata[$tv][$ttkk] = $ttv;
					}
					$j++;
					

				}
			}
		}

				echo json_encode($zyxwdata);
				//echo "<br>";

				exit;


	}
	function test()
	{
		set_time_limit(0); 
		ini_set('memory_limit','256M');

		$zyxw=json_decode($this->_menu['zyxw'],true);
		$mldm=json_decode($this->_menu['mldm'],true);

		foreach($zyxw as $key=>$val){
			echo $val['mc']."<br>";
		}
		echo "--------学术<br>";
		foreach($mldm as $key=>$val){
			echo $val['mc']."<br>";
		}


		exit;


		$sql = "SELECT * FROM chsi_major WHERE LEVEL=3";
		$ope= D('Major');
		$rs = $ope->query($sql);
		//var_dump($rs);exit;
		$data = array();
		$ope2=D('ZyMenuNoschool');

		foreach($rs as $key=>$val){

			$sql = "select * from chsi_major where id=".$val['pid'];
			$level2 = $ope->query($sql);
			$rs[$key]['yjxkdm']=$level2[0]['dm'];
			$rs[$key]['mldm']=$level2[0]['searchkey'];
			$data['mldm']=$level2[0]['searchkey'];
			$data['yjxkdm']=$level2[0]['dm'];
			$data['zymc']=$val['mc'];
			//$ope2->add($data);

			//var_dump($data);exit;


		}


	}


	function mklist()
	{
		set_time_limit(0); 
		ini_set('memory_limit','256M');

		$sql = "SELECT * FROM chsi_major WHERE LEVEL=3";
		$ope= D('Major');
		$rs = $ope->query($sql);
		//var_dump($rs);exit;
		$data = array();
		$ope2=D('ZyMenuNoschool');

		foreach($rs as $key=>$val){

			$sql = "select * from chsi_major where id=".$val['pid'];
			$level2 = $ope->query($sql);
			$rs[$key]['yjxkdm']=$level2[0]['dm'];
			$rs[$key]['mldm']=$level2[0]['searchkey'];
			$data['mldm']=$level2[0]['searchkey'];
			$data['yjxkdm']=$level2[0]['dm'];
			$data['zymc']=$val['mc'];
			//$ope2->add($data);

			//var_dump($data);exit;


		}


	}


	function mkstu()
	{
		set_time_limit(0); 
		ini_set('memory_limit','256M');

		$ope= D('StudScore');
		for($i=20;$i<40;$i++){

		$weixinid=$i;
		$school_id = "10001";
		$mldm = "zyxw";
		$yjxkdm = "1351";
		$zymc = "音乐";
		$class1 = mt_rand(1,100);
		$class2 = mt_rand(1,100);
		$class3 = mt_rand(1,150);
		$class4 = mt_rand(1,150);
		$class5 = mt_rand(1,100);

		$data['weixinid']=$weixinid;
		$data['school_id']=$school_id;
		$data['mldm']=$mldm;
		$data['yjxkdm']=$yjxkdm;
		$data['zymc']=$zymc;

		$data['class1']=$class1;
		$data['class2']=$class2;
		$data['class3']=$class3;
		$data['class4']=$class4;
		$data['class5']=$class5;
		$data['total']=$class5+$class4+$class3+$class2+$class1;
		$data['data_time']=date('Y',CURRENT_TIME);
		$data['c_time']=CURRENT_TIME;
		//$ope->add($data);
		}



	}

	function mkmenu()
	{
		set_time_limit(0); 
		ini_set('memory_limit','256M');

		$sql = "SELECT * FROM chsi_school1 ";
		$ope= D('Major');
		$rs = $ope->query($sql);

		foreach($rs as $key=>$val){

			$sql = "insert into chsi_zy_menu(mldm,yjxkdm,zymc,school_id) ";
			$sql .="value('".$val['mldm']."','".$val['yjxkdm']."','".$val['zymc']."','".$val['sccode']."') ";
			$sql .="on duplicate key update  ";
			$sql .="school_id= ".$val['sccode'];

			
			//$ope->execute($sql);

			//var_dump($data);exit;


		}
	}

	function school()
	{
		set_time_limit(0); 
		ini_set('memory_limit','256M');

		$sql = "SELECT * FROM chsi_school1 ";
		$ope= D('Major');
		$rs = $ope->query($sql);

		$i=0;
		foreach($rs as $key=>$val){

			$sql = "insert into chsi_school(sccode,scname,ssdm) ";
			$sql .="value('".$val['sccode']."','".$val['scname']."','".$val['ssdm']."') ";
			$sql .="on duplicate key update  ";
			$sql .="sccode= ".$val['sccode'];

			/*

			echo $sql."<br>";
			
			if($i>10)
			{
				break;
			}
			*/
			
			//$ope->execute($sql);
			$i++;

			//var_dump($data);exit;


		}
	}


}